Graphics options control the way graphics output looks. Some options are valid for most graphics output types, some valid for only one.
Some of the options "stick" until changed. Others stay the same until a clear command is issued, and yet others are reset to their defaults by either a clear command or a display command.
set ccolor color - sets the contour color,
where color is specified as a color number:
0 - black 5 - cyan
1 - white 6 - magenta
2 - red 7 - yellow
3 - green 8 - orange
4 - blue 15 - grey
Reset by clear or display
You can also issue:
set ccolor rainbow - to obtain the rainbow color sequence.
set cstyle style - sets the contour linestyle.
Style numbers are:
1 - solid
2 - long dash
3 - short dash
5 - dots
Reset by clear or display
set cthick thckns
- Sets the line thickness for the contours given an integer in the range of 1 to 20 representing relative line thicknesses. Thickness of 6 or more will be thicker on the screen. Primarily used for controlling hardcopy output.
set cterp on|off
- Turns spline smoothing on or off. "Sticks" until reset. Shaded contours are drawn without spline fitting, so to insure an exact match when overlaying contour lines and shaded contours of the same field, specify cterp as off. You can still use the 'csmooth' option, which affects both contour lines and shaded contours.
set clab on | off | forced | string | auto
- Controls contour labeling. "Sticks" until reset.
on - indicates 'fast' contour labels. Labels are plotted where the contour line is horizontal.
off - no contour labels
forced - an attempt is made to label all contour lines
string - specifies a 'substitution' template for conversion of the contour value to character. This conversion is done by a call to the C system library routine
'sprintf'. Do a man on printf (on the DECstations, do 'man 3s printf') to get information on how this substitution works. Note that a single floating point number is being passed to the sprintf routine for each use of the substitution string.
The result of this subsitution is then passed to the GrADS character plotting system. Font controls are also passed, so you may include GrADS font control commands in your substution string.
Default: set clab auto Uses a substituion string of %g
Example: set clab %gK Puts a K on the end of each label
set clab %g%% Puts a percent on the end
set clab %.2f Puts two digits after the decimal point on each label
set clab %03.0f Plots each contour value as a 3 digit integer with leading zeros
set clab Foo Labels each contour with Foo
Warning!!!! No error checking is done on this string! If you specify a multiple substitution (ie, %g%i), the sprintf routine will look for non-existent arguments and the result will probably be a core dump. You should not use substitutions for types other that float (ie, %i or %s should not be used).
This option gets reset to 'auto' when a clear is issued.
auto - specifies that you do not want a previously specified string to be used, but instead wish to use the default substitution.
set clopts color <thickness <size>>>
where color is the label color. -1 is the default, and indicates to use the contour line color as the label color
thickness is the label thickness. -1 is the default.
size is the label size. 0.09 is the default.
This setting stays set until changed by issuing another 'set clopts' command.
set cint value - sets the contour interval to the specified value. Reset by a clear or display
set clevs lev1 lev2 ... Sets specified contour levels. Reset by clear or display
set ccols col1 col2 ... Sets specified color for clev levels. Reset by clear or display
(Note: Rainbow sequence is: 9, 14, 4, 11, 5, 13, 3, 10, 7, 12, 8, 2, 6)
set csmooth on|off If on, the grid is interpolated to a finer grid using cubic interpolation before contouring. "Sticks".
Note: this option will result in contour values below and above the min and max of the un-interpolated grid. This may result in physically invalid values such as in the case of negative rainfall.
set cmin value Contours not drawn below this value. Reset by clear or display.
set cmax value Contours not drawn above this value. Reset by clear or display.
set black val1 val2 Contours not drawn within this interval. Reset by clear or display.
set strmden value
specifies the streamline density, where the value is from 1 to 10. 5 is default.
set rbcols color1 color2 <color3> ...
<auto>
Specifies a new 'rainbow' color sequence. The color numbers may be new colors defined via the 'set rgb' command. These colors replace the default rainbow color sequence whenever the rainbow color sequence is used.
If you 'set rbcols auto' the built in rainbow sequence is used.
This 'sticks' until reset.
set rbrange low high
sets the range of values used to determine which values acquire which rainbow color. By default, the low and high are set to the min and max of the result grid. This is reset by a clear command.
set ccolor color - Sets line color. Reset by clear or display
set cstyle style - Sets line style Reset by clear or display
set cmark marker - Sets line marker:
0 - none
1 - cross
2 - open circle
3 - closed circle
4 - open square
5 - closed square
Reset by clear or display
set vrange vlo vhi
Specifies the range of the variable values for axis scaling (usually the y axis). Reset by clear only.
set missconn on
By default, when GrADS plots a line graph, missing data is indicated by a 'break' in the line. set missconn on connects the lines across missing data.
set missconn off resets the default behavior
set bargap val
Sets the gap between bars in percent. val should range from 0 to 100. The default is 0, or no gap. A value of 100 gives a single vertical line for each bar.
set barbase val|bottom|top
If val is given, each bar rises or falls from that value, assuming the value is within the plotting range. If bottom is specified, each bar rises from the bottom of the plot. If top is specified, each bar falls from the top of the plot.
set dignum number Number of digits after the decimal place
set digsize size
Size (in inches, or plotter units) of the numbers. 0.1 to 0.15 is usually a good range to use. Both of these options stay the same until changed.
set arrscl size <magnitude>
Specifies arrow length scaling. Size is the length of the arrow in plotting units (inches on the virtual page). A typical value would be 0.5 to 1.0. Magnitude is the vector magnitude that will produce an arrow of the specified size. Other arrow lengths will be scaled appropriately. If magnitude is not given, all the arrows will be the same length. Reset by clear or display.
set arrowhead size
where size is the size of the arrowhead. The default is 0.05. If set to 0, no arrowhead is plotted. If set to a negative value, the size of the arrowhead will be scaled to the size of the arrow. The value specified will be the size when the arrow is one inch in length.
set fgvals value color <value color> <value color> ...
The fgrid output type treats the grid values as rounded integers, and will shade a specified integer valued grid with the specified color.Unspecified values are not shaded. "Sticks".
set zlog on|off - Sets log scaling of the Z dimension on or off. Sticks until reset.
set xaxis|yaxis start end <incr>
Specifies the axis is to be labeled from the specified start value to the specified end value with the specified increment. Labels may have no relation to data or dimensions.
set grid on | off | style values | horizontal | vertical
Draw or do not draw grid lines using the specified color and linestyle. Default is to draw grid lines with color 15 (grey) and with linestyle 5 (dotted). horizontal indicates to only plot the horizontal grid lines; vertical the vertical grid lines. 'Sticks' until changed.
set xlopts color <thickness < size >>
ylopts
where: xlopts controls the X Axis
ylopts controls the Y Axis
color: Label color (Default 1)
thickness: Label thickness (Default 4)
size: Label size (Default 0.12)
set xlevs lab1 lab2 ...
ylevs
Specifies the label levels to plot for the X or Y axis. Each label desired is specified by the user. Reset by a clear command.
If you have set xaxis or yaxis, then set xlevs/ylevs, the levels specified apply to the labelling range specified in the xaxis or yaxis command.
This command does not apply to a date/time axis.
set xlint interval
ylint
Specifies the label interval. Overridden by 'set xlevs/ylevs'. Reset by a clear command.
Note that the labels are always 'started' at 0. ie, if you set the interval to 3, the labels will be 0, 3, 6, 9 ...
If you set the interval to a negative value, this indicates to start the labelling at the axis start value. If this were 1 (with and interval of 3), then the labels would be 1, 4, 7...
This setting will override a labelling interval specified on the xaxis or yaxis commands.
This command does not apply to a date/time axis.
draw title string Draw title at top of graph. Backslash within string denotes new line.
set xlab on | off | auto | string
ylab
This works the same way as the 'set clab' command. An example:
set ylab %.2f
would plot all the Y axis labels with 2 digits after the decimal point. This is reset by a clear command.
set annot color <thickness>
Sets color and line thicknesses for the above 3 draw commands. Default is white, thickness 6. This command also sets the color and thickness for the axis border, axis labels, and tickmarks. Axis tickmarks and labels are plotted at the specified thickness minus 1.
set xyrev on - Reverses the axes on a plot.
Example:
By default for a Z, T plot, the time dimension is plotted horizontally, and the Z dimension is plotted vertically. By setting xyrev, the time dimension would be plotted vertically and the Z dimension would be plotted horizontally.
set xflip on
flips the order of the horizontal axis (whatever axis is horizontal after xyrev is applied).
set yflip on - flips the order of the vertical axis.
All the above axis orientation commands are reset by a 'clear' or 'set vpage' command.
set mproj proj -- Sets current map projection.
Keywords are:
latlon - the default. Lat/lon projection with aspect ratio maintained.
scaled - latlon projection where aspect ratio is not maintained. The plot fills the plotting area.
nps - north polar stereographic
sps - south polar stereographic
off - same as scaled, but no map is drawn and axis lables are not interpreted as lat/lon labels.
set mpvals lonmin lonmax latmin latmax
-- Sets reference longitudes and latitudes for polar stereographic plots. By default, these are set to the current dimension environment limits. This command overrides that, and allows the data-reference to be decoupled with the map display. The polar plot will be drawn such that the region bounded by these longitudes and latitudes will be entirely included in the plot.
GrADS will plot lat/lon lines on polar plots with no labels as yet. To turn this off,
set grid off
set mpdset <lowres|mres|hires|nmap>
- lowres is the default. mres and hires have state and countryoutlines. nmap covers only North America.
set poli on|off
Selects whether you want political boundries drawn for the mres or hires map data sets. The default is on.
set map color style thickness
- Draws the map background using the requested line attributes.
set mpdraw on|off
If off, does not draw the map background. Requested map scaling is still in force.
All the above settings stay the same until changed by new set commands.
set display grey|greyscale|color <black|white> -- Sets the mode of the display.
By default, the mode is color, where shading and contouring is done with a rainbow of colors. When using a monochrome display, these colors may not map to greyscale in a pleasing way. When the mode is set to greyscale, contours are displayed using a single grey level, and shaded contours are done using a sequence of greyscales.
You may optionally set the hardware background color to black or white. The default is black.
Issuing: set display grey white
gives a result on the display that is very similar to the output produced by gxps.
This command DOES NOT affect hardcopy output.
You can also control the frame on a plot:
set frame on | off | circle
where:
on plots a rectangular frame around the clipped region
off plots no frame
circle plots a rectangular frame for lat-lon projections, plots a circular frame for a polar plot at the outermost latitude. Used for whole-hemisphere plots only.